package com.kkb.service.file.impl;

import com.kkb.bean.FileTagsTable;
import com.kkb.dao.FileTagsTableMapper;
import com.kkb.service.file.FileTagsTableService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @Author 何世鹏
 * @Date 2021/4/12 10:55
 */
@Service
public class FileTagsTableServiceImpl implements FileTagsTableService {

    @Autowired
    private FileTagsTableMapper mapper;

    @Override
    public void del(HttpServletRequest req, HttpServletResponse resp,Integer fileId) {
        List<FileTagsTable> select = mapper.select(new FileTagsTable(fileId));
        for (FileTagsTable fileTagsTable : select) {
            mapper.delete(fileTagsTable);
        }
    }
}
